import { IBiz } from '@shared/interfaces/biz'
import { IPagination } from '@shared/interfaces/pagination'

export enum IAamsLevel {
  Acquirer = 'institution',
  Group = 'agent',
  Merchant = 'merchant',
  Store = 'store',
}

export interface IAamsItem extends IBiz {
  code?: string // 内部主键
  num?: string // 外部编号，当level为机构和集团时和code值一样
  level?: string
  name?: string
  nameEN?: string
  insName?: string
  agentName?: string
  merName?: string
  storeName?: string
}

export interface IAamsPagination extends IPagination {
  data: IAamsItem[]
}

// query params
export interface IAamsQuery {
  page: number
  size: number
  level?: IAamsLevel
  searchTerm?: string
  insCode?: string
  agentCode?: string
  intMerCode?: string
  intStoreCode?: string
}

// 设置机构、集团、商户的必填校验
export interface IAamsRequired {
  acquirer: boolean,
  group: boolean,
  merchant: boolean,
}
